package springcloudDemo;


import springcloudDemo.model.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "eureka-provider")
public interface IFeignService {

    @RequestMapping("/index")
    String indexService();

    @RequestMapping(value = "/hello1",method = RequestMethod.GET)
    String hello(@RequestParam("name") String name);

    @RequestMapping(value = "/hello2",method = RequestMethod.GET)
    User hello(@RequestHeader("name")String name, @RequestHeader("age") Integer age);

    @RequestMapping(value="/hello3",method = RequestMethod.POST)
    String hello(@RequestBody User user);

}
